import java.util.Scanner;

public class AnotherWay {
    public static int Separate(String s){
        int Number = 0;
        String[] z = s.split(" ");
        for (int i = 0; i < z.length;i++){
            Number++;
        }
        return Number;
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String z = scanner.nextLine();
        System.out.println(Separate(z));
    }
}
